//
//  HTClassPurchaseInfoModel.swift
//  QuitSmokingApp
//
//  Created by z on 2024/3/18.
//

import Foundation

struct HTClassPurchaseInfoModel: Codable {
    var var_isSubscribe: Bool {
        get{
            if var_expiresDateMS <= 0 {
                return false
            }else{
                // 当前时间戳
                let var_currentTimestamp = Date().timeIntervalSince1970
                // 比较给定时间戳和当前时间戳
                if var_expiresDateMS > var_currentTimestamp * 1000 {
                    print("指定时间大于当前时间")
                    return true
                }else {
                    print("指定时间小于等于当前时间")
                    return false
                }
            }
        }
    }
    var var_productId: String = ""
    var var_productName: String = ""
    var var_expiresDateMS: TimeInterval = 0
}
